<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <script>
      "use strict";
      // Load Bugsnag in strict mode
      var script = document.createElement('script');
      script.src = '/docs/node_modules/@bugsnag/browser/dist/bugsnag.min.js';
      script.onload = function() {
        "use strict";
        
        // Verify we're actually in strict mode
        function isStrictMode() {
          try {
            return !arguments.callee;
          } catch (e) {
            return true; // TypeError thrown = strict mode
          }
        }
        
        var NOTIFY = decodeURIComponent(window.location.search.match(/NOTIFY=([^&]+)/)[1])
        var SESSIONS = decodeURIComponent(window.location.search.match(/SESSIONS=([^&]+)/)[1])
        var API_KEY = decodeURIComponent(window.location.search.match(/API_KEY=([^&]+)/)[1])
        window.bugsnagClient = window.Bugsnag.start({
          apiKey: API_KEY,
          endpoints: { notify: NOTIFY, sessions: SESSIONS }
        })
        
        if (!isStrictMode()) {
          // Notify about strict mode detection failure instead of throwing
          var strictModeError = new Error('Expected to be in strict mode, but strict mode is not active');
          strictModeError.name = 'StrictModeError';
          window.Bugsnag.notify(strictModeError);
          return; // Exit early
        }
        
        // Execute the test after Bugsnag is loaded and configured
        var customError = {
          name: 'Unlikely scenario',
          stack: window.Bugsnag.Event.getStacktrace()
        }
        window.Bugsnag.notify(customError)
      };
      document.head.appendChild(script);
    </script>
  </head>
  <body>
  </body>
</html>
